﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="NewsEdit.aspx.cs" Inherits="Myproject.BSM.PcWeb.PcChannel.Article.NewsEdit" ValidateRequest="false" %>

<div class="bjui-pageHeader">
    <div class="bjui-searchBar">
        <ul class="breadcrumb">
            <li><a><i class="fa fa-university"></i>后台管理中心</a></li>
            <li><a><i class="fa fa-desktop"></i>电脑端管理</a></li>
            <li class="active"><a><i class="fa fa-map-signs"></i>图文编辑</a></li>
        </ul>
    </div>
</div>
<div class="bjui-pageContent">
    <form runat="server" action="/bsm/ashx/PcChannel/NewsEdit.ashx"  id="pc_Channel_NewsEdit_form" data-toggle="validate" data-alertmsg="false">
        <input id="pc_Channel_NewsEdit_ID" runat="server" name="pc_Channel_NewsEdit_ID" type="hidden" value="0" />
        <input id="pc_Channel_NewsEdit_channelID" runat="server" name="pc_Channel_NewsEdit_channelID" type="hidden" value="" />
        <ul class="nav nav-tabs" role="tablist">
            <li class="active"><a href="#messages" role="tab" data-toggle="tab">属性</a></li>
            <li><a href="#content" role="tab" data-toggle="tab">中文内容</a></li>
            <li><a href="#econtent" role="tab" data-toggle="tab">英文内容</a></li>
        </ul>
        <div class="tab-content">
            <div class="tab-pane fade active in" id="messages">
                <table class="table table-condensed table-hover" width="100%">
                    <tbody>
                        <tr>
                            <td>
                                <label for="j_custom_sale" class="control-label x85">标题：</label>
                                <input runat="server" type="text" name="pc_Channel_NewsEdit_title" id="pc_Channel_NewsEdit_title" value="" size="40" maxlength="150" placeholder="标题，100字以内" data-rule="required">
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <label for="j_custom_sale" class="control-label x85">副标题：</label>
                                <input runat="server" type="text" name="pc_Channel_NewsEdit_subtitle" id="pc_Channel_NewsEdit_subtitle" value="" size="40" maxlength="150" placeholder="副标题，100字以内">
                            </td>
                        </tr>
                        <tr style="display:none;">
                            <td>
                                <label for="j_custom_sale" class="control-label x85">英文标题：</label>
                                <input runat="server" type="text" name="pc_Channel_NewsEdit_etitle" id="pc_Channel_NewsEdit_etitle" value="" size="40" maxlength="150" placeholder="英文标题，100字以内">
                            </td>
                        </tr>
                        <tr style="display:none;">
                            <td>
                                <label for="j_custom_sale" class="control-label x85">英文副标题：</label>
                                <input runat="server" type="text" name="pc_Channel_NewsEdit_esubtitle" id="pc_Channel_NewsEdit_esubtitle" value="" size="40" maxlength="150" placeholder="英文副标题，100字以内">
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <label for="j_custom_sale" class="control-label x85">关键字：</label>
                                <input runat="server" type="text" name="pc_Channel_NewsEdit_keywords" id="pc_Channel_NewsEdit_keywords" value="" size="40" maxlength="50" placeholder="关键字，用“，”分割，50字以内">
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <label for="j_custom_sale" class="control-label x85">描述：</label>
                                <input runat="server" type="text" name="pc_Channel_NewsEdit_description" id="pc_Channel_NewsEdit_description" value="" size="40" maxlength="100" placeholder="描述，100字以内">
                            </td>
                        </tr>
                        <%--<tr>
                            <td>
                                <label for="j_custom_sale" class="control-label x85">封面图片：</label>
                                <div style="display: inline-block; vertical-align: middle;">
                                    <div id="doc_pic_up" data-toggle="upload" data-uploader="/BSM/Ashx/PcChannel/ArticleUpload.ashx"
                                        data-file-size-limit="1024000000"
                                        data-file-type-exts="*.jpg;*.png;"
                                        data-multi="true"
                                        data-on-upload-success="pc_channel_imageslist_js_success"
                                        data-icon="cloud-upload">
                                    </div>
                                    <input runat="server" type="hidden" name="doc.pic" value="" id="doc_pic">
                                </div>
                                <span id="doc_span_pic" runat="server"></span>
                            </td>
                        </tr>--%>
                        <tr>
                            <td>
                                <label for="j_custom_sale" class="control-label x85">频道：</label>
                                <input runat="server" readonly type="text" name="pc_Channel_NewsEdit_channelname" id="pc_Channel_NewsEdit_channelname" class="form-control" size="20" data-rule="required"  data-title="选择频道" data-toggle="lookup" data-url="/bsm/pcweb/PcChannel/Article/selectChannel.aspx" />
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <label for="j_custom_sale" class="control-label x85">状态：</label>
                                <input runat="server" type="checkbox" id="pc_Channel_NewsEdit_show" name="pc_Channel_NewsEdit_show" value="true" checked data-toggle="icheck" data-label="显示">
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <label for="j_custom_sale" class="control-label x85">发布日期：</label>
                                <input runat="server" type="text" name="pc_Channel_NewsEdit_showtime" id="pc_Channel_NewsEdit_showtime" value="" data-pattern="yyyy-MM-dd HH:mm:ss" data-toggle="datepicker" data-rule="required;datetime" size="20">
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <label for="j_custom_sale" class="control-label x85">外链：</label>
                                <input runat="server" type="text" name="pc_Channel_NewsEdit_url" id="pc_Channel_NewsEdit_url" placeholder="https://***" size="30" maxlength="200">
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <label for="j_custom_sale" class="control-label x85">来源：</label>
                                <input runat="server" type="text" name="pc_Channel_NewsEdit_Source" id="pc_Channel_NewsEdit_Source" value="" size="20" placeholder="">
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <label for="j_custom_sale" class="control-label x85">作者：</label>
                                <input runat="server" type="text" name="pc_Channel_NewsEdit_Editor" id="pc_Channel_NewsEdit_Editor" value="" size="20" placeholder="">
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <label for="j_custom_sale" class="control-label x85">浏览数：</label>
                                <input runat="server" type="text" name="pc_Channel_NewsEdit_ReadTmes" id="pc_Channel_NewsEdit_ReadTmes" value="0" size="20" placeholder="" data-rule="required;readtimes" data-rule-readtimes="[/^\d{1,6}$/, '请填写1到6位数字']">
                            </td>
                        </tr>
                    </tbody>
                </table>
            </div>
            <div class="tab-pane fade" id="content" style="height:600px; padding: 0px;">
                <textarea name="" id="txtArticleContent" runat="server" style="height: 500px; width:100%;"></textarea>
                <script type="text/javascript">
                    var editor = new baidu.editor.ui.Editor({ wordCount: false, elementPathEnabled: false, zIndex: 100 });
                    editor.render('txtArticleContent');
                </script>
                <style>
                    #content div {border: 0px;}
                </style>
            </div>
            <div class="tab-pane fade" id="econtent" style="height:600px; padding: 0px;">
                <textarea name="" id="txtArticleContent2" runat="server" style="height: 500px; width:100%;"></textarea>
                <script type="text/javascript">
                    var editor = new baidu.editor.ui.Editor({ wordCount: false, elementPathEnabled: false, zIndex: 100 });
                    editor.render('txtArticleContent2');
                </script>
                <style>
                    #econtent div {border: 0px;}
                </style>
            </div>
        </div>


    </form>
</div>
<div class="bjui-pageFooter">
    <ul>
        <li>
            <button type="button" class="btn-close" data-icon="close">取消</button></li>
        <li>
            <button type="submit" class="btn-green" data-icon="save">保存</button></li>
    </ul>
</div>
<script type="text/javascript">
    function pc_channel_imageslist_js_success(file, data) {
        //alert(file);
        //alert(data);
        var json = $.parseJSON(data)
        //$(this).bjuiajax('ajaxDone', json)
        if (json[BJUI.keys.statusCode] == BJUI.statusCode.ok) {
            $('#doc_pic').val(json.fileName)
            $('#doc_span_pic').html('已上传图片：<img src="' + json.fileName + '" width="100">')
        }
    }
</script>
